﻿CREATE TABLE [dbo].[Users] (
    [UserKey]            UNIQUEIDENTIFIER NOT NULL,
    [Username]           NVARCHAR (50)    NULL,
    [Password]           NVARCHAR (50)    NULL,
    [IsAdmin]            BIT              NOT NULL,
    [Firstname]          NVARCHAR (50)    NULL,
    [Lastname]           NVARCHAR (50)    NULL,
    [Email]              NVARCHAR (100)   NOT NULL,
    [Zipcode]            NVARCHAR (50)    NULL,
    [ResponsesRemaining] INT              NOT NULL,
    [InvitesRemaining]   INT              NOT NULL,
    [InvitedByUserKey]   UNIQUEIDENTIFIER NULL,
    [IsRemoved]          BIT              NOT NULL,
    [LastLogin]          DATETIME2 (7)    NULL,
    [LastModified]       DATETIME2 (7)    NULL,
    [CreatedOn]          DATETIME2 (7)    NOT NULL
);

